{% extends "main_template.html" %}

{% block body %}

      <div id="visit">
    
	{% ifequal type "blog_list" %}
		

		<h2> Lista blogow: </h2>
		<p>
		<table>
		<tr> <th> Autor </th> <th> Nazwa </th> <th> Link </th> <tr>	
		{% for id, author, name  in blog_list %}

		
		<tr>  <td> {{ author }}  </td><td> {{ name }} </td> <td> <a href=/browser/view/{{ id }}> zobacz </a> </td> </tr>

		{% endfor %}
		</table>
		</p>
	{% endifequal %}



	{% ifequal type "note_list" %}
		

		<h2> Lista wpisow:</h2>
		Dla blogu <b>{{ name }}  </b> autorstwa  <b> {{ author }} </b>
		<p>
		<table>
		<tr> <th> Temat </th> <th> Data </th> <th> Link </th> <tr>	
		{% for id, topic, date_  in note_list %}

		
		<tr>  <td> {{ topic }}  </td><td> {{ date_ }} </td> <td> <a href=/browser/view/{{ id }}> zobacz </a> </td> </tr>

		{% endfor %}
		</table>
		</p>
	{% endifequal %}




	{% ifequal type "comment_list" %}
		

		<h2> Lista komentarzy:</h2>
		Dla blogu <b>{{ name }}  </b> autorstwa  <b> {{ author }} </b> o temacie <b> {{ topic }} </b>
		<p>
		<table>
		<tr> <th> Temat </th> <th> Data </th> <th> Autor </th> <th> Link </th> <tr>	
		{% for id, top, date_, aut  in comment_list %}

		
		<tr>  <td> {{ top }}  </td><td> {{ date_ }} </td> <td> {{ aut }} </td> <td> <a href=/browser/view/{{ id }}> zobacz </a> </td> </tr>

		{% endfor %}
		</table>
		</p>
	{% endifequal %}

	{% ifequal type "comment" %}
		
		<h2> Komentarz: </h2>
		<p>
		<table>
		<tr>  <td> Autor </td><td> {{ author }} </td></tr>
		<tr>  <td> Blog </td><td> {{ blog_name }} </td></tr>
		<tr>  <td> Adres	</td><td> {{ address }}	 </td></tr>
		<tr>  <td> Data napisania	</td><td> {{ date_ }}	 </td></tr>
		<tr>  <td> Tresc	</td><td> {{ content }}	 </td></tr>
		<tr>  <td> Data dodania	</td><td>data: {{ add_time.year}}-{{ add_time.month }}-{{ add_time.day }} godzina: {{ add_time.hour }}:{{ add_time.minute }}:{{ add_time.second }}</td></tr>
		<tr>  <td> id	</td><td> {{ id_ }}	 </td></tr>
		</table>
		</p>
	{% endifequal %}


	{% ifequal type "blog" %}
		
		<h2> Blog: </h2>
		<p>
		<table>
		<tr>  <td> Autor </td><td> {{ author }} </td></tr>
		<tr>  <td> Blog </td><td> {{ blog_name }} </td></tr>
		<tr>  <td> Adres	</td><td> {{ address }}	 </td></tr>
		<tr>  <td> Data dodania	</td><td>data: {{ add_time.year}}-{{ add_time.month }}-{{ add_time.day }} godzina: {{ add_time.hour }}:{{ add_time.minute }}:{{ add_time.second }}</td></tr>
		<tr>  <td> id	</td><td> {{ id_ }}	 </td></tr>
		</table>
		</p>
	{% endifequal %}

  {% ifequal type "bloag_list" %}
  <table> <th> title </th>  <th> date </th> 
    {% for id, address, topic, date_ in info %}  
      <tr> <td> <a href="crawler/blog/{{ id }}">{{topic}}</a> </td> <td>{{ date_}} </td> </tr>

    {% endfor %}

    </table>
        <p class="more"><a href="instructions/crawler">Instrukcja</a></p>
      </div>
     
	

  {% endifequal %}


  {% ifequal type "blog_content" %}
    {% for id, c_id,  content, address  in info %}  
    <br>
      id : {{ c_id }}
    <br>
    <br>
    Tresc:
    <br>
     <p>
      {{ content }}
      </p>
    <br>
      {{ address }}
    <br>
    <br>

    {% endfor %}

        <p class="more"><a href="instructions/crawler">Instrukcja</a></p>
      </div>
     
	

  {% endifequal %}

  {% ifequal type "comment_list" %}
  <table> <th> title </th>  <th> date </th> 
    {% for id, id_c, address, topic in info %}  
      <tr> <td> {{ forloop.counter }} </td><td> <a href="crawler/comment/{{ id }}">{{topic}}</a> </td>  </tr>

    {% endfor %}

    </table>
        <p class="more"><a href="instructions/crawler">Instrukcja</a></p>
      </div>
     
	

  {% endifequal %}
 {% ifequal type "comment" %}
    {% for author, comment,  date_  in info %}  
      {{ author }} <br>
      {{ comment }} <br>
      {{ date_ }} <br>
    {% endfor %}

        <p class="more"><a href="instructions/crawler">Instrukcja</a></p>
      </div>
     
	

  {% endifequal %}
   <p class="more"><a href="/instructions/browser">Instrukcja</a></p>
{% endblock %}
